use model_graph_peer::assistant::assistant_local_chat;
use model_graph_types::{
    assistant::chat::{ChatMessage, ChatOptions, ChatProvider},
    connector::{Connector, QueryOptions},
    modeling::Value,
};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    tracing_subscriber::fmt()
        .with_max_level(tracing::Level::DEBUG)
        .init();
    tracing::info!("RRAI 启动...");

    let messages: Vec<ChatMessage> = vec![ChatMessage::user(String::from("你是谁？"))];

    let res = assistant_local_chat(messages, ChatOptions::new()).await;

    match res {
        Ok(response) => {
            tracing::debug!("{:?}", response);
        }
        Err(err) => {
            tracing::error!("{:?}", err);
        }
    }

    Ok(())
}
